package com.rc.saas.tenant.vo.elec;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.sql.Time;
import java.sql.Timestamp;
import java.time.LocalTime;
import java.util.Date;

public class ElecPileOfflineResultVo {
    @ExcelIgnore
    private Long elecPileId;
    @ExcelProperty("桩群")
    private String stationName;
    @ExcelProperty("桩编号")
    private String pileNo;
    @ExcelProperty("电桩类型")
    private String pileElecType;
    @ExcelProperty("桩品牌")
    private String brandName;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelProperty("离线时间")
    private Date beginTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelProperty("恢复时间")
    private Date endTime;
//    @JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8")
//    @DateTimeFormat(pattern = "HH:mm:ss")
    @ExcelProperty("离线时长")
    private String offlineTime;

    public Long getElecPileId() {
        return elecPileId;
    }

    public void setElecPileId(Long elecPileId) {
        this.elecPileId = elecPileId;
    }

    public String getStationName() {
        return stationName;
    }

    public void setStationName(String stationName) {
        this.stationName = stationName;
    }

    public String getPileNo() {
        return pileNo;
    }

    public void setPileNo(String pileNo) {
        this.pileNo = pileNo;
    }

    public String getPileElecType() {
        if ("1".equals(pileElecType)) {
            return "单直流";
        } else if ("2".equals(pileElecType)) {
            return "单交流";
        } else if ("3".equals(pileElecType)) {
            return "双直流";
        } else if ("4".equals(pileElecType)) {
            return "双交流";
        } else if ("5".equals(pileElecType)) {
            return "交直流一体";
        }
        return pileElecType;
    }

    public void setPileElecType(String pileElecType) {
        this.pileElecType = pileElecType;
    }

    public String getBrandName() {
        return brandName;
    }

    public void setBrandName(String brandName) {
        this.brandName = brandName;
    }

    public Date getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(Date beginTime) {
        this.beginTime = beginTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public String getOfflineTime() {
        return offlineTime;
    }

    public void setOfflineTime(String offlineTime) {
        this.offlineTime = offlineTime;
    }
}
